package com.cxs.service.impl;

import com.cxs.mapper.WorkorderMapper;
import com.cxs.model.Workorder;
import com.cxs.service.WorkorderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/*
 * @Author:cxs
 * @Date:2021/10/1  11:33
 * @Version 1.0
 * @Motto:放下杂念,只为迎接明天更好的自己
 * */
@Service
public class WorkorderServiceImpl implements WorkorderService {

    @Autowired
    private WorkorderMapper workorderMapper;

    @Override
    public String add(Workorder workorder) {
        return workorderMapper.insert(workorder) > 0 ? "success" : "fail";
    }

    @Override
    public List<Workorder> list() {
        return workorderMapper.selectList();
    }
}
